<template>
  <div class="formControls">
    <SelectTheRegion v-if="props.itemData.id == draggableItem.id" @delItem="delItem"></SelectTheRegion>
    <SearchForm :queryForm="queryForm">
      <template #searcContent>
        <el-form-item label="订单Id" label-width="70">
          <el-input v-model="queryForm.user" placeholder="请输入Id" clearable />
        </el-form-item>
        <el-form-item label="名称" label-width="70">
          <el-input v-model="queryForm.user" placeholder="请输入名称" clearable />
        </el-form-item>
        <el-form-item label="性别" label-width="70">
          <el-input v-model="queryForm.user" placeholder="请输入性别" clearable />
        </el-form-item>
        <el-form-item label="版本号" label-width="70">
          <el-input v-model="queryForm.region" placeholder="请输入版本号" clearable />
        </el-form-item>
        <el-form-item label="时间" label-width="70">
          <el-date-picker v-model="queryForm.date" type="date" value-format="YYYY-MM-DD" placeholder="请输入时间" clearable />
        </el-form-item>
      </template>
      <template #searchBtn>
        <el-button type="primary">提交</el-button>
        <el-button type="info">重置</el-button>
      </template>
    </SearchForm>
  </div>
</template>

<script setup lang="ts">
import SelectTheRegion from '@/pages/lowCode/components/lowCodeAdd/lowCodeContent/selectTheRegion/index.vue';
import SearchForm from '@/components/searchForm/index.vue';
import { storeToRefs } from 'pinia';
import { lowCode } from '@/store/modules/lowCode';
import { reactive } from 'vue';
const lowCodeStore = lowCode();
const { draggableItem } = storeToRefs(lowCodeStore);
const props: any = defineProps({
  itemData: {
    type: Object,
    default: [],
  },
  del: {
    type: Function, // 假设 del 是一个函数类型的 prop
  },
});
const delItem = () => {
  props.del(props.itemData);
};
const queryForm: any = reactive({
  user: '',
  region: '',
  date: '',
});
</script>

<style lang="scss" scoped>
.formControls {
  width: 100%;
  // height: 200px;
  position: relative;
  overflow: hidden;
}
</style>
